#ifndef TC_MEMDUMP_HPP
#define TC_MEMDUMP_HPP

/** \file MemDump.hpp
 * Declarations for the template function MemDump.
 *
 * (C) Copyright  Semih Cemiloglu
 * All rights reserved, see COPYRIGHT file for details.
 *
 * $Id $
 *
 *
 */

#include <string>
#include "Global.hh"


namespace TC {

  std::string MemToString(const unsigned char* mem, unsigned size);

  template <typename T>
  inline
  std::string MemDump(const T& obj)
  {
    return MemToString(reinterpret_cast<const unsigned char*>(&obj), 
                       sizeof(T));
  }

} // end namespace


#endif 
